import ElementPlus from 'element-plus'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import 'element-plus/dist/index.css'

import App from './App'
import {xsDateUtils,xsDatetimeUtils} from 'xstack-for-javascript';
import { createSSRApp } from 'vue'
import xcCloginUtils from '@/library/xcore/js/XcCloginUtils';
import xcHttpUtils from "@/library/xcore/js/XcHttpUtils";
import xcLangUtils from '@/library/xcore/js/XcLangUtils';

export function createApp() {
  const app = createSSRApp(App)
  app.use(ElementPlus)
  app.use(xcLangUtils.createI18n());
  
  for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
  }
  
  return {
    app
  }
}
 